const fs = require('fs');
const xlsx = require('node-xlsx'); // 读写xlsx的插件
var list = xlsx.parse("./a.xlsx");
let rows = list[0].data;
let html = '<table border="2" style="text-align:center;">';
for (var i = 0; i < rows.length; i++) {
    html += '<tr>';
    for (var j = 0; j < rows[i].length; j++) {
        if (j > 3) { continue }
        html += `<td>${rows[i][j]}</td>`
    }
    html += '</tr>';
}
html += '</table>';
fs.writeFileSync('./data.html', '');
fs.appendFileSync('./data.html', html, function() {})